import java.awt.Color;
import java.awt.Graphics;

public class Portal extends Item implements Drawable{
	
	private String map;
	private World world;
	private Player p;
	private int newCol, newRow;
	
	public Portal(int c, int r, String map, int newC, int newR, Player p){
		super(c, r);
		this.map = map;
		this.p = p;
		newCol = newC;
		newRow = newR;
		world = World.getInstance();
	}
	
	@Override
	public void activate(){
		//System.out.println("hit portal");
		world.setMap(new Map(map, p));
		world.getMap().player.setX(newCol);
		world.getMap().player.setY(newRow);
	}
	
	@Override
	public void draw(Graphics g) {
		g.setColor(Color.red);
		//g.drawOval(Main.TILE_SIZE*col, Main.TILE_SIZE*row, Main.TILE_SIZE, Main.TILE_SIZE); //just a circle for now
	}
}
